package com.arron.test;

public class ShapeFactory extends AbstractFactory{
    @Override
    public Color getColor(String color) {
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        if(shape==null)
            return null;
        if(shape.equalsIgnoreCase("RECTANGLE"))
            return new Rectangle();
        if(shape.equalsIgnoreCase("SQUARE"))
            return new Square();
        if(shape.equalsIgnoreCase("CIRCLE"))
            return new Circle();
        return null;
    }
}
